function indices=metric(chromosome,nObj,nVar,ybounds,k)
min_left=min(chromosome(:,nVar+1));
max_right=max(chromosome(:,nVar+2));
chromosome(:,nVar+1:nVar+2)=(chromosome(:,nVar+1:nVar+2)-min_left)./(max_right-min_left);

min_left1=min(chromosome(:,nVar+3));
max_right1=max(chromosome(:,nVar+4));
chromosome(:,nVar+3:nVar+4)=(chromosome(:,nVar+3:nVar+4)-min_left1)./(max_right1-min_left1);

npop=size(chromosome,1);
sp=spp(chromosome,nObj,nVar);
yz=yanzhan(chromosome,nObj,nVar);
indices.sp(k)=sp;
indices.yz(k)=yz;
if nObj==4
    hv=[];
    nrOfSamples=10000;
    points=[];
    points(:,1)=chromosome(:,nVar+1);
    points(:,2)=chromosome(:,nVar+3);
    hv(1) = zhypeIndicatorSampled( points, ybounds, nrOfSamples);
    
    points(:,1)=chromosome(:,nVar+2);
    points(:,2)=chromosome(:,nVar+4);
    hv(2) = zhypeIndicatorSampled( points, ybounds, nrOfSamples);
    if hv(2)<=hv(1)
        hv(3)=hv(1);
        hv(4)=hv(2);
        hv(1)=hv(4);
        hv(2)=hv(3);
    end
    hv=hv(1:2);
    indices.whv(k)=hv(1);
    indices.bhv(k)=hv(2);
    imprecise=0; 
    for i=1:npop
        imprecise=imprecise+abs((chromosome(i,nVar + 2)-chromosome(i,nVar + 1)))+...
        abs((chromosome(i,nVar + 4)-chromosome(i,nVar + 3)));
    end
    indices.im(k)=imprecise;
elseif nObj==6
    hv=[];    
    nrOfSamples=10000;
    points=[];
    points(:,1)=chromosome(:,nVar+1);
    points(:,2)=chromosome(:,nVar+3);
    points(:,3)=chromosome(:,nVar+5);
    hv(1) = zhypeIndicatorSampled( points, ybounds, nrOfSamples);
    points(:,1)=chromosome(:,nVar+2);
    points(:,2)=chromosome(:,nVar+4);
    points(:,3)=chromosome(:,nVar+6);
    hv(2) = zhypeIndicatorSampled( points, ybounds, nrOfSamples);
    if hv(2)<=hv(1)
        hv(3)=hv(1);
        hv(4)=hv(2);
        hv(1)=hv(4);
        hv(2)=hv(3);
    end
    hv=hv(1:2);
    indices.whv(k)=hv(1);
    indices.bhv(k)=hv(2);
    
    imprecise=0;
    for i=1:npop
        imprecise=imprecise+abs((chromosome(i,nVar + 2)-chromosome(i,nVar + 1)))+...
        abs((chromosome(i,nVar + 4)-chromosome(i,nVar + 3)))+abs((chromosome(i,nVar + 6)-chromosome(i,nVar + 5)));
    end
    indices.im(k)=imprecise;
    
    
end
    
end

    

